<html>
<head><meta charset="utf-8"><title>queries currently available · t-compiler/wg-rustc-dev-guide · Zulip Chat Archive</title></head>
<h2>Stream: <a href="https://rust-lang.github.io/zulip_archive/stream/196385-t-compiler/wg-rustc-dev-guide/index.html">t-compiler/wg-rustc-dev-guide</a></h2>
<h3>Topic: <a href="https://rust-lang.github.io/zulip_archive/stream/196385-t-compiler/wg-rustc-dev-guide/topic/queries.20currently.20available.html">queries currently available</a></h3>

<hr>

<base href="https://rust-lang.zulipchat.com">

<head><link href="https://rust-lang.github.io/zulip_archive/style.css" rel="stylesheet"></head>

<a name="211633888"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/196385-t-compiler/wg-rustc-dev-guide/topic/queries%20currently%20available/near/211633888" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/196385-t-compiler/wg-rustc-dev-guide/topic/queries.20currently.20available.html#211633888">(Sep 29 2020 at 15:06)</a>:</h4>
<p>from <a href="https://rustc-dev-guide.rust-lang.org/rustc-driver.html">https://rustc-dev-guide.rust-lang.org/rustc-driver.html</a></p>



<a name="211633936"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/196385-t-compiler/wg-rustc-dev-guide/topic/queries%20currently%20available/near/211633936" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/196385-t-compiler/wg-rustc-dev-guide/topic/queries.20currently.20available.html#211633936">(Sep 29 2020 at 15:06)</a>:</h4>
<blockquote>
<p>You can see what queries are currently available through the rustdocs for <a href="https://doc.rust-lang.org/nightly/nightly-rustc/rustc_interface/interface/struct.Compiler.html">Compiler</a>.</p>
</blockquote>



<a name="211633957"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/196385-t-compiler/wg-rustc-dev-guide/topic/queries%20currently%20available/near/211633957" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/196385-t-compiler/wg-rustc-dev-guide/topic/queries.20currently.20available.html#211633957">(Sep 29 2020 at 15:06)</a>:</h4>
<p>I guess that meant to be</p>



<a name="211634018"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/196385-t-compiler/wg-rustc-dev-guide/topic/queries%20currently%20available/near/211634018" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/196385-t-compiler/wg-rustc-dev-guide/topic/queries.20currently.20available.html#211634018">(Sep 29 2020 at 15:07)</a>:</h4>
<blockquote>
<p>You can see what queries are currently available through the rustdocs for <a href="https://doc.rust-lang.org/nightly/nightly-rustc/rustc_interface/struct.Queries.html">Queries</a>.</p>
</blockquote>



<a name="211634023"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/196385-t-compiler/wg-rustc-dev-guide/topic/queries%20currently%20available/near/211634023" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/196385-t-compiler/wg-rustc-dev-guide/topic/queries.20currently.20available.html#211634023">(Sep 29 2020 at 15:07)</a>:</h4>
<p>?</p>



<a name="211634727"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/196385-t-compiler/wg-rustc-dev-guide/topic/queries%20currently%20available/near/211634727" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/196385-t-compiler/wg-rustc-dev-guide/topic/queries.20currently.20available.html#211634727">(Sep 29 2020 at 15:12)</a>:</h4>
<p>There are more queries than that</p>



<a name="211634772"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/196385-t-compiler/wg-rustc-dev-guide/topic/queries%20currently%20available/near/211634772" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/196385-t-compiler/wg-rustc-dev-guide/topic/queries.20currently.20available.html#211634772">(Sep 29 2020 at 15:12)</a>:</h4>
<p><code>lint_mod</code> isn't on there</p>



<a name="211634875"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/196385-t-compiler/wg-rustc-dev-guide/topic/queries%20currently%20available/near/211634875" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/196385-t-compiler/wg-rustc-dev-guide/topic/queries.20currently.20available.html#211634875">(Sep 29 2020 at 15:12)</a>:</h4>
<p>The one I normally look at is <a href="https://doc.rust-lang.org/nightly/nightly-rustc/rustc_middle/ty/query/struct.Providers.html">https://doc.rust-lang.org/nightly/nightly-rustc/rustc_middle/ty/query/struct.Providers.html</a></p>



<a name="211634917"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/196385-t-compiler/wg-rustc-dev-guide/topic/queries%20currently%20available/near/211634917" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/196385-t-compiler/wg-rustc-dev-guide/topic/queries.20currently.20available.html#211634917">(Sep 29 2020 at 15:13)</a>:</h4>
<p>Or just <a href="https://doc.rust-lang.org/nightly/nightly-rustc/rustc_middle/ty/struct.TyCtxt.html">https://doc.rust-lang.org/nightly/nightly-rustc/rustc_middle/ty/struct.TyCtxt.html</a> although it has some things that aren't queries</p>



<a name="211637279"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/196385-t-compiler/wg-rustc-dev-guide/topic/queries%20currently%20available/near/211637279" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> bjorn3 <a href="https://rust-lang.github.io/zulip_archive/stream/196385-t-compiler/wg-rustc-dev-guide/topic/queries.20currently.20available.html#211637279">(Sep 29 2020 at 15:28)</a>:</h4>
<p>This section is specifically talking about the driver, which has its own queries, including a query to create and get the <code>TyCtxt</code>.</p>



<a name="211637365"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/196385-t-compiler/wg-rustc-dev-guide/topic/queries%20currently%20available/near/211637365" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/196385-t-compiler/wg-rustc-dev-guide/topic/queries.20currently.20available.html#211637365">(Sep 29 2020 at 15:29)</a>:</h4>
<p>ahh that's confusing</p>



<a name="211637399"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/196385-t-compiler/wg-rustc-dev-guide/topic/queries%20currently%20available/near/211637399" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/196385-t-compiler/wg-rustc-dev-guide/topic/queries.20currently.20available.html#211637399">(Sep 29 2020 at 15:29)</a>:</h4>
<p>could we mention that in the docs? that there are different types of queries?</p>



<a name="211641674"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/196385-t-compiler/wg-rustc-dev-guide/topic/queries%20currently%20available/near/211641674" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/196385-t-compiler/wg-rustc-dev-guide/topic/queries.20currently.20available.html#211641674">(Sep 29 2020 at 15:56)</a>:</h4>
<p>maybe that yeah</p>



<a name="211641778"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/196385-t-compiler/wg-rustc-dev-guide/topic/queries%20currently%20available/near/211641778" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/196385-t-compiler/wg-rustc-dev-guide/topic/queries.20currently.20available.html#211641778">(Sep 29 2020 at 15:56)</a>:</h4>
<p><span class="user-mention silent" data-user-id="133247">bjorn3</span> <a href="#narrow/stream/196385-t-compiler.2Fwg-rustc-dev-guide/topic/queries.20currently.20available/near/211637279">said</a>:</p>
<blockquote>
<p>This section is specifically talking about the driver, which has its own queries, including a query to create and get the <code>TyCtxt</code>.</p>
</blockquote>
<p>but still, is that information in <code>Compiler</code> or is the current text wrong?</p>



<a name="211641809"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/196385-t-compiler/wg-rustc-dev-guide/topic/queries%20currently%20available/near/211641809" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Santiago Pastorino <a href="https://rust-lang.github.io/zulip_archive/stream/196385-t-compiler/wg-rustc-dev-guide/topic/queries.20currently.20available.html#211641809">(Sep 29 2020 at 15:57)</a>:</h4>
<p>it didn't seem to me that that is correct as is</p>



<a name="211643464"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/196385-t-compiler/wg-rustc-dev-guide/topic/queries%20currently%20available/near/211643464" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/196385-t-compiler/wg-rustc-dev-guide/topic/queries.20currently.20available.html#211643464">(Sep 29 2020 at 16:07)</a>:</h4>
<p>I don't really understand what's going on in those docs :/</p>



<a name="211643504"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/196385-t-compiler/wg-rustc-dev-guide/topic/queries%20currently%20available/near/211643504" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/196385-t-compiler/wg-rustc-dev-guide/topic/queries.20currently.20available.html#211643504">(Sep 29 2020 at 16:07)</a>:</h4>
<p>the <code>override_queries</code> are <code>Providers</code>, not <code>Queries</code> <a href="https://doc.rust-lang.org/nightly/nightly-rustc/rustc_interface/interface/struct.Compiler.html#structfield.override_queries">https://doc.rust-lang.org/nightly/nightly-rustc/rustc_interface/interface/struct.Compiler.html#structfield.override_queries</a></p>



<a name="211643543"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/196385-t-compiler/wg-rustc-dev-guide/topic/queries%20currently%20available/near/211643543" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/196385-t-compiler/wg-rustc-dev-guide/topic/queries.20currently.20available.html#211643543">(Sep 29 2020 at 16:07)</a>:</h4>
<p>where are Queries used?</p>



<a name="211644006"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/196385-t-compiler/wg-rustc-dev-guide/topic/queries%20currently%20available/near/211644006" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> bjorn3 <a href="https://rust-lang.github.io/zulip_archive/stream/196385-t-compiler/wg-rustc-dev-guide/topic/queries.20currently.20available.html#211644006">(Sep 29 2020 at 16:10)</a>:</h4>
<p><code>Queries</code> is what you get when you call <code>.enter()</code> on <code>Compiler</code>.</p>



<a name="211644106"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/196385-t-compiler/wg-rustc-dev-guide/topic/queries%20currently%20available/near/211644106" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> bjorn3 <a href="https://rust-lang.github.io/zulip_archive/stream/196385-t-compiler/wg-rustc-dev-guide/topic/queries.20currently.20available.html#211644106">(Sep 29 2020 at 16:11)</a>:</h4>
<div class="codehilite" data-code-language="Rust"><pre><span></span><code><span class="n">compiler</span><span class="p">.</span><span class="n">enter</span><span class="p">(</span><span class="o">|</span><span class="n">queries</span><span class="o">|</span><span class="w"> </span><span class="p">{</span><span class="w"></span>
<span class="w">    </span><span class="c1">// run the various queries you want</span>
<span class="p">});</span><span class="w"></span>
</code></pre></div>



<hr><p>Last updated: Aug 07 2021 at 22:04 UTC</p>
</html>